﻿angular.module('ui.bootstrap.demo', ['ui.bootstrap']);
angular.module('ui.bootstrap.demo').controller('GlReportsCtrl', function ($scope) {
    $scope.inputdates = [];
    $scope.today = function () {
        $scope.inputdates[0] = new Date();
        $scope.inputdates[1] = new Date();
    };
    $scope.today();

    $scope.clear = function () {
        $scope.inputdates[0] = null;
        $scope.inputdates[1] = null;
    };

    $scope.open = function ($event) {
        $event.preventDefault();
        $event.stopPropagation();

        $scope.opened = true;
    };

    $scope.dateOptions = {
        formatYear: 'yyyy',
        startingDay: 1
    };

    $scope.reports = ['Report One', 'Report Two', 'Report Theee'];
    $scope.report = 'Report One';
    $scope.format = 'yyyy-MM-dd';

    function DropdownCtrl($scope) {
        $scope.actions = [
          { id: 'action1', name: 'Action 1' },
          { id: 'action2', name: 'Action 2' },
          { id: 'action3', name: 'Action 3' }
        ];
        $scope.selectedAction = $scope.actions[0];
        $scope.setAction = function (action) {
            $scope.selectedAction = action;
        };
        $scope.submit = function () {
            console.log($scope.selectedAction.id);
        };
    }


});